
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module telemetry.internal.platform.profiler.android_profiling_helper</title>
<meta charset="utf-8">
</head><body bgcolor="#f0f0f8">

<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong><a href="telemetry.html"><font color="#ffffff">telemetry</font></a>.<a href="telemetry.internal.html"><font color="#ffffff">internal</font></a>.<a href="telemetry.internal.platform.html"><font color="#ffffff">platform</font></a>.<a href="telemetry.internal.platform.profiler.html"><font color="#ffffff">profiler</font></a>.android_profiling_helper</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="../telemetry/internal/platform/profiler/android_profiling_helper.py">telemetry/internal/platform/profiler/android_profiling_helper.py</a></font></td></tr></table>
    <p><tt>#&nbsp;Copyright&nbsp;2014&nbsp;The&nbsp;Chromium&nbsp;Authors.&nbsp;All&nbsp;rights&nbsp;reserved.<br>
#&nbsp;Use&nbsp;of&nbsp;this&nbsp;source&nbsp;code&nbsp;is&nbsp;governed&nbsp;by&nbsp;a&nbsp;BSD-style&nbsp;license&nbsp;that&nbsp;can&nbsp;be<br>
#&nbsp;found&nbsp;in&nbsp;the&nbsp;LICENSE&nbsp;file.</tt></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
    
<tr><td bgcolor="#aa55cc"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="telemetry.internal.platform.profiler.android_prebuilt_profiler_helper.html">telemetry.internal.platform.profiler.android_prebuilt_profiler_helper</a><br>
<a href="telemetry.internal.util.binary_manager.html">telemetry.internal.util.binary_manager</a><br>
<a href="telemetry.decorators.html">telemetry.decorators</a><br>
<a href="glob.html">glob</a><br>
</td><td width="25%" valign=top><a href="hashlib.html">hashlib</a><br>
<a href="logging.html">logging</a><br>
<a href="devil.android.md5sum.html">devil.android.md5sum</a><br>
<a href="os.html">os</a><br>
</td><td width="25%" valign=top><a href="platform.html">platform</a><br>
<a href="re.html">re</a><br>
<a href="shutil.html">shutil</a><br>
<a href="sqlite3.html">sqlite3</a><br>
</td><td width="25%" valign=top><a href="subprocess.html">subprocess</a><br>
<a href="telemetry.core.platform.html">telemetry.core.platform</a><br>
<a href="telemetry.core.util.html">telemetry.core.util</a><br>
</td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#eeaa77">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
    
<tr><td bgcolor="#eeaa77"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl><dt><a name="-CreateSymFs"><strong>CreateSymFs</strong></a>(device, symfs_dir, libraries, use_symlinks<font color="#909090">=True</font>)</dt><dd><tt>Creates&nbsp;a&nbsp;symfs&nbsp;directory&nbsp;to&nbsp;be&nbsp;used&nbsp;for&nbsp;symbolizing&nbsp;profiles.<br>
&nbsp;<br>
Prepares&nbsp;a&nbsp;set&nbsp;of&nbsp;files&nbsp;("symfs")&nbsp;to&nbsp;be&nbsp;used&nbsp;with&nbsp;profilers&nbsp;such&nbsp;as&nbsp;perf&nbsp;for<br>
converting&nbsp;binary&nbsp;addresses&nbsp;into&nbsp;human&nbsp;readable&nbsp;function&nbsp;names.<br>
&nbsp;<br>
Args:<br>
&nbsp;&nbsp;device:&nbsp;DeviceUtils&nbsp;instance&nbsp;identifying&nbsp;the&nbsp;target&nbsp;device.<br>
&nbsp;&nbsp;symfs_dir:&nbsp;Path&nbsp;where&nbsp;the&nbsp;symfs&nbsp;should&nbsp;be&nbsp;created.<br>
&nbsp;&nbsp;libraries:&nbsp;Set&nbsp;of&nbsp;library&nbsp;file&nbsp;names&nbsp;that&nbsp;should&nbsp;be&nbsp;included&nbsp;in&nbsp;the&nbsp;symfs.<br>
&nbsp;&nbsp;use_symlinks:&nbsp;If&nbsp;True,&nbsp;link&nbsp;instead&nbsp;of&nbsp;copy&nbsp;unstripped&nbsp;libraries&nbsp;into&nbsp;the<br>
&nbsp;&nbsp;&nbsp;&nbsp;symfs.&nbsp;This&nbsp;will&nbsp;speed&nbsp;up&nbsp;the&nbsp;operation,&nbsp;but&nbsp;the&nbsp;resulting&nbsp;symfs&nbsp;will&nbsp;no<br>
&nbsp;&nbsp;&nbsp;&nbsp;longer&nbsp;be&nbsp;valid&nbsp;if&nbsp;the&nbsp;linked&nbsp;files&nbsp;are&nbsp;modified,&nbsp;e.g.,&nbsp;by&nbsp;rebuilding.<br>
&nbsp;<br>
Returns:<br>
&nbsp;&nbsp;The&nbsp;absolute&nbsp;path&nbsp;to&nbsp;the&nbsp;kernel&nbsp;symbols&nbsp;within&nbsp;the&nbsp;created&nbsp;symfs.</tt></dd></dl>
 <dl><dt><a name="-GetPerfhostName"><strong>GetPerfhostName</strong></a>(*args, **kwargs)</dt></dl>
 <dl><dt><a name="-GetRequiredLibrariesForPerfProfile"><strong>GetRequiredLibrariesForPerfProfile</strong></a>(profile_file)</dt><dd><tt>Returns&nbsp;the&nbsp;set&nbsp;of&nbsp;libraries&nbsp;necessary&nbsp;to&nbsp;symbolize&nbsp;a&nbsp;given&nbsp;perf&nbsp;profile.<br>
&nbsp;<br>
Args:<br>
&nbsp;&nbsp;profile_file:&nbsp;Path&nbsp;to&nbsp;perf&nbsp;profile&nbsp;to&nbsp;analyse.<br>
&nbsp;<br>
Returns:<br>
&nbsp;&nbsp;A&nbsp;set&nbsp;of&nbsp;required&nbsp;library&nbsp;file&nbsp;names.</tt></dd></dl>
 <dl><dt><a name="-GetRequiredLibrariesForVTuneProfile"><strong>GetRequiredLibrariesForVTuneProfile</strong></a>(profile_file)</dt><dd><tt>Returns&nbsp;the&nbsp;set&nbsp;of&nbsp;libraries&nbsp;necessary&nbsp;to&nbsp;symbolize&nbsp;a&nbsp;given&nbsp;VTune&nbsp;profile.<br>
&nbsp;<br>
Args:<br>
&nbsp;&nbsp;profile_file:&nbsp;Path&nbsp;to&nbsp;VTune&nbsp;profile&nbsp;to&nbsp;analyse.<br>
&nbsp;<br>
Returns:<br>
&nbsp;&nbsp;A&nbsp;set&nbsp;of&nbsp;required&nbsp;library&nbsp;file&nbsp;names.</tt></dd></dl>
 <dl><dt><a name="-GetToolchainBinaryPath"><strong>GetToolchainBinaryPath</strong></a>(library_file, binary_name)</dt><dd><tt>Return&nbsp;the&nbsp;path&nbsp;to&nbsp;an&nbsp;Android&nbsp;toolchain&nbsp;binary&nbsp;on&nbsp;the&nbsp;host.<br>
&nbsp;<br>
Args:<br>
&nbsp;&nbsp;library_file:&nbsp;ELF&nbsp;library&nbsp;which&nbsp;is&nbsp;used&nbsp;to&nbsp;identify&nbsp;the&nbsp;used&nbsp;ABI,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;architecture&nbsp;and&nbsp;toolchain.<br>
&nbsp;&nbsp;binary_name:&nbsp;Binary&nbsp;to&nbsp;search&nbsp;for,&nbsp;e.g.,&nbsp;'objdump'<br>
Returns:<br>
&nbsp;&nbsp;Full&nbsp;path&nbsp;to&nbsp;binary&nbsp;or&nbsp;None&nbsp;if&nbsp;the&nbsp;binary&nbsp;was&nbsp;not&nbsp;found.</tt></dd></dl>
 <dl><dt><a name="-PrepareDeviceForPerf"><strong>PrepareDeviceForPerf</strong></a>(device)</dt><dd><tt>Set&nbsp;up&nbsp;a&nbsp;device&nbsp;for&nbsp;running&nbsp;perf.<br>
&nbsp;<br>
Args:<br>
&nbsp;&nbsp;device:&nbsp;DeviceUtils&nbsp;instance&nbsp;identifying&nbsp;the&nbsp;target&nbsp;device.<br>
&nbsp;<br>
Returns:<br>
&nbsp;&nbsp;The&nbsp;path&nbsp;to&nbsp;the&nbsp;installed&nbsp;perf&nbsp;binary&nbsp;on&nbsp;the&nbsp;device.</tt></dd></dl>
</td></tr></table>
</body></html>